@import '~@styles/common.less';

.Cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100vh;
  margin-bottom: 10px;
  z-index: 99;
  .clickNoSelectText();

  &::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-size: cover;
    animation-name: imageAnimation;
    animation-duration: 20s;
    animation-iteration-count: infinite;
    z-index: -1;
  }

  .content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100% - 10px);
    background-color: rgba(0, 0, 0, 0.2);

    .desc {
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      color: @fff;
      width: 100%;
      height: 200px;

      .authorName {
        margin-bottom: 50px;
        font-size: 5rem;
        font-family: '黑体';
        font-weight: 600;
        background: -webkit-linear-gradient(
          45deg,
          #3da8fa,
          #ffffff,
          #19acfb,
          #ffffff,
          #40b3ff
        );
        color: transparent;
        background-clip: text;
        animation: run 20s linear infinite;
        cursor: pointer;
      }

      .line {
        width: 100%;
        font-family: Righteous;
        color: white;
        font-size: 2.5rem;
        text-transform: uppercase;
        line-height: 1;
        animation: letterspacing 3s infinite alternate ease-in-out;
        display: block;
        position: absolute;
        left: 50%;
        top: 52%;
        transform: translate3d(-50%, 0, 0);
        letter-spacing: -0.7rem;
      }
    }
  }

  .downWrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.2);

    .shaking {
      animation: shaking 1s infinite;
      cursor: pointer;
      padding: 0 50px;

      .downIcon {
        font-size: 25px;
        color: @fff;
      }
    }
  }
}

.MobileCover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 200px;
  margin-bottom: 6px;
  z-index: 99;
  .clickNoSelectText();

  .content {
    height: 100%;
    width: 100%;
    background-color: @fff;

    .load {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100%;
      width: 100%;
    }

    .carouselWrap {
      position: relative;

      .carouselItem {
        height: 200px;
        color: @fff;
        font-size: 18px;
        padding-top: 15px;
        padding-left: 20px;
      }

      .authorName {
        display: flex;
        align-items: center;
        padding-right: 20px;
        font-size: 14px;
        margin-top: 5px;
        .ellipsis();

        .tag,
        .classify {
          .ellipsis();
        }

        .tag {
          margin-right: 15px;
        }
      }

      .abstract {
        position: absolute;
        right: 20px;
        bottom: 20px;
        color: @fff;
        font-size: 14px;
        padding-left: 20px;

        .ellipsisMore(1);
      }
    }

    :global {
      .ant-carousel .slick-dots-bottom {
        bottom: -3px;
      }
    }
  }
}

@keyframes shaking {
  0% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(-5px);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
}

@keyframes caret {
  50% {
    border-right-color: @fff;
  }
}

@keyframes letterspacing {
  0% {
    letter-spacing: -1.5rem;
    filter: blur(0.3rem);
  }

  50% {
    filter: blur(0.5rem);
  }

  100% {
    letter-spacing: 0.5rem;
    filter: blur(0rem);
    color: @fff;
  }
}

@keyframes run {
  from {
    backgroud-position: 0 0;
  }

  to {
    background-position: 2109px 0;
  }
}

@keyframes imageAnimation {
  0% {
    background-image: url('@/assets/images/sea.jpg');
  }

  50% {
    background-image: url('@/assets/images/ssm.jpg');
  }

  100% {
    background-image: url('@/assets/images/sea.jpg');
  }
}
